package com.bjpowernode.mvc.model.param;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 登录接收的参数
 */
@Data
public class UserParam {

    @NotEmpty(message = "必须提供手机号")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式错误")
    private String phone;

    @NotEmpty(message = "必须提供密码")
    @Size(min = 32,max = 32,message = "密码格式错误")
    private String password;

    @NotEmpty(message = "必须提供验证码")
    @Size(min = 4,max = 4,message = "验证码格式错误")
    private String code;
}
